﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CompilerLib.Scanner
{
    public sealed class KleeneStarExpression : RegularExpression
    {
        public RegularExpression innerExpression { get; set; }
        public KleeneStarExpression(RegularExpression exp)
        {
            innerExpression = exp;
        }
        public override string ToString()
        {
            return "(" + innerExpression.ToString() + ")*";
        }

        internal override T Accept<T>(RegularExpressionConverter<T> converter)
        {
            return converter.ConvertKleeneStar(this);
        }
    }
}
